Using The View’s FormFind method retrieve a handle to another open screen using its (FormCode) property. The following example gets a handle to the "MyForm" screen, then uses its TheView object, and remotely closes it. The On Error statement ensures that the remote screen is only closed if the FormFind method was able to return a valid handle.
|
Set FormObject = TheView.FormFind("MyForm") On Error Resume Next FormObject.TheView.Cancel On Error GoTo 0 |